<!DOCTYPE html>
<html>
<head>
    <!-- 页面meta -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>传智健康</title>
    <meta name="description" content="传智健康">
    <meta name="keywords" content="传智健康">
    <meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport">
    <!-- 引入样式 -->
    <link rel="stylesheet" href="../plugins/elementui/index.css">
    <link rel="stylesheet" href="../plugins/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="../css/style.css">
    <!-- 引入组件库 -->

    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <script src="../js/vue.js"></script>
    <script src="../plugins/elementui/index.js"></script>
    <script type="text/javascript" src="//api.map.baidu.com/api?v=2.0&ak=j62hC43Q8dGDu2NLLUSFAsl5X9pVsoQd"></script>
    <script src="../js/axios-0.18.0.js"></script>
    <style>

        body, html,#container {width: 100%;height: 100%;overflow: hidden;margin:0;font-family:"微软雅黑";}
       #allmap{height:500px;width:100%;}
       #r-result{width:100%; font-size:14px;}
    </style>

</head>
<body class="hold-transition">
<div id="app">
    <div class="content-header">
        <h1>首页<small>体检机构分布图</small></h1>
        <el-breadcrumb separator-class="el-icon-arrow-right" class="breadcrumb">
            <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
            <el-breadcrumb-item>体检机构分布图</el-breadcrumb-item>
            <el-breadcrumb-item>分布图</el-breadcrumb-item>
        </el-breadcrumb>
    </div>
    <template>
        <el-tabs v-model="activeName" type="card" >
            <el-tab-pane label="分布图" name="first" >
                <el-container  >
                <iframe name="right" class="el-main" src="map.html" width="100%" height=600px" frameborder="0"></iframe>
            </el-container>
            </el-tab-pane>
            <el-tab-pane label="详细信息" name="second">
                <iframe name="right" class="el-main" src="companylist.html" width="100%" height="500px" frameborder="0">
                </iframe>
            </el-tab-pane>
        </el-tabs>
    </template>



</div>
</body>
<!--百度地图js-->
<script type="text/javascript">
    // 百度地图API功能
    var map = new BMap.Map("allmap");
    map.centerAndZoom("南京",12);

    var geolocation = new BMap.Geolocation();
    geolocation.getCurrentPosition(function(r){
        if(this.getStatus() == BMAP_STATUS_SUCCESS){
            var mk = new BMap.Marker(r.point);
            map.addOverlay(mk);
            map.panTo(r.point);
            alert('您的位置：'+r.point.lng+','+r.point.lat);
        }
        else {
            alert('failed'+this.getStatus());
        }
    },{enableHighAccuracy: true})

    /*
        var map = new BMap.Map("allmap");
        map.centerAndZoom(new BMap.Point(118.77807441,32.0572355));
        map.enableScrollWheelZoom(point,12);
    */

    // 用经纬度设置地图中心点
    function theLocation(){
        if(document.getElementById("longitude").value != "" && document.getElementById("latitude").value != ""){
            map.clearOverlays();
            var new_point = new BMap.Point(document.getElementById("longitude").value,document.getElementById("latitude").value);
            var marker = new BMap.Marker(new_point);  // 创建标注
            map.addOverlay(marker);              // 将标注添加到地图中
            map.panTo(new_point);
        }
    }
</script>

<script>
    var vue = new Vue({
        el: '#app',
        data:{
            activeName:'first',//添加/编辑窗口Tab标签名称
        },
        methods:{
          /*  reloadAgain(){
                location.reload(true);
            }*/
        }

    })
</script>
</html>
